/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 38917
 * Date: 2025-02-25
 * Time: 22:00
 */
public class PrimeNumber {
    public static void main(String[] args) {
        for (int i = 1; i < 101; i++) {
            if (i == 1 || i ==2){
                System.out.print(i + "是素数 ");
            }
            int j;
            for (j = 2; j < Math.sqrt(i); j++) {
                if (i % j == 0){
                    break;
                }
            }
            if (j > Math.sqrt(i) && i != 1 && i != 2){
                System.out.print(i + "是素数 ");
            }
        }
    }
}
